1. Field of the Invention
Embodiments of the present invention generally relate to generating an all-in-focus image and constructing a depth map of a scene from a single image.
2. Description of the Related Art
In computer vision and other imaging based applications, the distance from the point of image capture to objects in the scene being captured is important information. This distance or depth to objects is generally communicated in form of a depth map. Further, it is particularly desirable in many applications to be able to determine scene depth using a single camera.
There are several known techniques in the art for determining a depth map using a single camera. One particular class of techniques uses multiple images captured by a single camera from a single viewpoint to determine a depth map. Such techniques may be classified as either depth from focus (DFF) techniques or depth from defocus (DFD) techniques. In general, DFF techniques use multiple images of a scene captured at different focus positions. Image patches of each image are analyzed to find the image with the best focus position for an object in a particular image patch. The depth of the object can then be determined using the well-known lens formula. The requirement for multiple images may result in long capture times and long processing times, and requires sufficient memory to store the multiple images until processing is complete.
In general, DFD techniques use a small number of images (typically less than DFF techniques) of a scene captured using differing parameters such as focus or aperture. The images are analyzed to determine the difference in the amount of blurring in objects in the scene. A measure of the blur differences is then used to determine the depths of the objects. Various techniques for relating a measure of blur difference to depth have been proposed. Some DFD techniques use as few as two images. DFD techniques may be prone to error, for example, due to small amount of data used (as compared to DFF techniques), any movement in the scene and/or of the camera between image captures, and the complex relationship between blur and object distance.